import Vue from 'vue'
import VueRouter from 'vue-router'
// import Index from "../views/index.vue"
Vue.use(VueRouter)
import index from "../views/index.vue"
const routes = [{
    path: '/',
    name: '',
    // component: () => import(/* webpackChunkName: "index" */ '../views/index.vue')
    component: index

  },
  // {
  //   path: '/index',
  //   component: () => import( /* webpackChunkName: "index_copy" */ '../views/index_copy.vue'),
  // },
  {
    path: "/login",
    component: () => import( /* webpackChunkName: "login" */ '../views/login.vue'),
  },
  {
    path: "/register",
    component: () => import( /* webpackChunkName: "register" */ '../views/register.vue')
  },
  {
    path: "/list",
    component: () => import( /* webpackChunkName: "list" */ '../views/list.vue')
  },
  {
    path: "/detail/:lid",
    component: () => import( /* webpackChunkName: "detail" */ '../views/detail.vue'),
    props: true
  },
  {
    path: "/lists/:title",
    component: () => import( /* webpackChunkName: "lists" */ '../views/lists.vue'),
    props: true
  },
  // {
  //   path: '/about',
  //   name: 'About',
  //   // route level code-splitting
  //   // this generates a separate chunk (about.[hash].js) for this route
  //   // which is lazy-loaded when the route is visited.
  //   component: () => import(/* webpackChunkName: "about" */ '../views/About.vue')
  // }
  {
    path: "/shopcart",
    component: () => import( /* webpackChunkName: "shopcart" */ '../views/shopCart.vue')
  },
]

const router = new VueRouter({
  routes
})

export default router